import request from '@/utils/request.js'

// 获取供应商列表
export const getVendorListService = () => {
    return request.get('/vendors/list')
}

// 添加供应商
export const addVendorService = (data) => {
    return request.post('/vendors/add', data)
}

// 分页查询供应商列表
export const getVendorListPageService = (params) => {
    return request.get('/vendors/list/page', {params: params})
}

// 更新供应商
export const updateVendorService = (data) => {
    return request.put('/vendors/update', data)
}

// 删除供应商
export const deleteVendorService = (id) => {
    return request.delete(`/vendors/delete/${id}`)
}

// 批量删除供应商
export const deleteVendorBatchService = (data) => {
    return request.delete('/vendors/deleteBatch', {data: data})
}